#!/bin/bash

param=$*

mindinsight start $param
while true
do
    sleep 30
    processnum=`ps -ef | grep -w gunicorn | grep -v grep | wc -l`
    if [ $processnum -le 0 ];then
      exit 1  
    fi
done
